package com.customer.crm.customer.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author Lyp
 * @create 2021/12/22
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("tb_crm_customer")
@Alias("customer")
public class Customer {
    private Integer id;

    @TableField(value = "owner_user_id")
    private String ownerUserId;

    @TableField(value = "creator_user_id")
    private String creatorUserId;

    @TableField("cusname")
    private String customerName;

    private String origin;

    private String address;

    @TableField("zip_code")
    private String zipCode;

    private String industry;

    @TableField(value = "annual_reven")
    private String annualReven;

    private String ownership;

    private String rating;

    @TableField(fill = FieldFill.INSERT, value = "create_time")
    private LocalDateTime createTime;

    @TableField(fill=FieldFill.UPDATE,value="update_time")
    private LocalDateTime updateTime;

    @TableField(value = "delete_status")
    @TableLogic(value="1",delval = "0")
    private Integer deleteStatus;

    @TableField(value = "is_locked")
    private Integer isLocked;

    @TableField(value = "delete_user_id")
    private String deleteUserId;

    @TableField(value = "delete_time")
    private Date deleteTime;

    @TableField(exist = false)
    private  String days;
}
